package MyIO;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class demo9 {
    public static void main(String[] args) {
        try (Reader reader = new FileReader("D:\\software\\code\\2023_java\\2023_java_code\\code_24_4_21\\src\\MyFile\\MyText.text")){
            char[] chars = new char[3];
            int n;
            while ((n = reader.read(chars)) != -1){
                String s = new String(chars,0,n);
                System.out.print(s);
            }
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
